package cn.com.artemis.security.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @Author enbool
 * @create 2020/3/12 18:55
 */
@Component
@ConfigurationProperties(prefix = "app.security.oauth2")
public class OAuth2Properties {

    private String jwtSigningKey = "crm_key";

    private String storeType = "jwt";

    /**
     * 使用RBAC做权限控制
     */
    private boolean useRBAC = false;

    private OAuth2ClientProperties[] clients = {};

    /**
     * Getter Setter
     *
     */

    public boolean getUseRBAC() {
        return useRBAC;
    }

    public void setUseRBAC(boolean useRBAC) {
        this.useRBAC = useRBAC;
    }

    public String getJwtSigningKey() {
        return jwtSigningKey;
    }

    public void setJwtSigningKey(String jwtSigningKey) {
        this.jwtSigningKey = jwtSigningKey;
    }

    public String getStoreType() {
        return storeType;
    }

    public void setStoreType(String storeType) {
        this.storeType = storeType;
    }

    public OAuth2ClientProperties[] getClients() {
        return clients;
    }

    public void setClients(OAuth2ClientProperties[] clients) {
        this.clients = clients;
    }
}